import  'bytemd/dist/index.css'
import './editor.css'
import gfm from '@bytemd/plugin-gfm'
import { Editor } from '@bytemd/react'
import React from "react";


const plugins = [
    gfm(),
    // Add more plugins here
]
interface MdEditorProps{
    value:string,
    setValue:React.Dispatch<any>
}
const MarkdownEditor: React.FC<MdEditorProps> = ({value,setValue}) => {

    return (
        <Editor
            value={value}
            plugins={plugins}
            onChange={(v) => {
                setValue(v)
            }}

        />
    )
}
export default MarkdownEditor;
